#!/bin/bash
#%depends: tuda_sync
#%provides: tuda
#%stage: setup
#Author: Geert Geurts, geert.geurts@hrz.tu-darmstadt.de
(
. /lib/tuda-lib.sh
[ "$debug" ]&&echo "tuda: Running tuda..."
if [ -d /root/lib/tuda_initrd_finalize ]; then
	for POSTSCRIPT in /root/lib/tuda_initrd_finalize/*.sh; do
		bash $POSTSCRIPT
	done
else
	[ "$debug" ]&&echo "tuda: NO FINALIZE SCRIPTS FOUND, not doing anything..."
fi
busybox killall -9 sshd 			#kill any remaining sshd processes
) 2>&1|tee /tmp/tuda_finalize.log
cp /tmp/tuda*.log /root/var/log/
